package com.ghosthigh.simpleaccount.client.common;

import com.ghosthigh.simpleaccount.client.common.HeaderView.HeaderViewHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.HasWidgets;

public class HeaderPresenter implements HeaderViewHandler, Presenter {

  private HeaderView view;

  public HeaderPresenter(HeaderView view) {
    this.view = view;
    bind();
  }

  void bind() {
    view.setHandler(this);
  }

  @Override
  public void go(HasWidgets container) {
    container.add(view.asWidget());
    fetchAndBindData();
  }

  private void fetchAndBindData() {
    // TODO: get header related data.
  }
}
